package com.tt.dp.singleton.chocolate;

public class ChocolateBoiler {

    private boolean empty;

    private boolean boiled;

    public ChocolateBoiler(){
        this.empty = true;
        this.boiled = false;
    }


    public void fill(){

        if(isEmpty()){
            this.empty = false;
            this.boiled = false;
        }
    }

    public void drain(){

        if(!isEmpty() && !isBoiled()){
            this.empty = true;
        }
    }

    public void boil(){

        if(!isEmpty() && !isBoiled()){
            this.boiled = true;
        }
    }

    public boolean isEmpty() {
        return empty;
    }

    public void setEmpty(boolean empty) {
        this.empty = empty;
    }

    public boolean isBoiled() {
        return boiled;
    }

    public void setBoiled(boolean boiled) {
        this.boiled = boiled;
    }
}
